<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/api/api_lib.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('api__lib_8c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">api_lib.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="opt_8h.html">lwip/opt.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="api_8h.html">lwip/api.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="memp_8h.html">lwip/memp.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ip_8h.html">lwip/ip.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="raw_8h.html">lwip/raw.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="udp_8h.html">lwip/udp.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="api__msg_8h.html">lwip/priv/api_msg.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="tcp__priv_8h.html">lwip/priv/tcp_priv.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="tcpip__priv_8h.html">lwip/priv/tcpip_priv.h</a>&quot;</code><br />
<code>#include &quot;path/to/my/lwip_hooks.h&quot;</code><br />
<code>#include &lt;string.h&gt;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad0a0434e5ff08bb350740cb840e2aca8"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api__lib_8c.html#ad0a0434e5ff08bb350740cb840e2aca8">netconn_new_with_proto_and_callback</a> (enum <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a> t, u8_t proto, <a class="el" href="api_8h.html#a3e130339f00202b3ab714af502163a2d">netconn_callback</a> callback)</td></tr>
<tr class="separator:ad0a0434e5ff08bb350740cb840e2aca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad5c079af0ad791a92fe9dade375744f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gad5c079af0ad791a92fe9dade375744f0">netconn_prepare_delete</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gad5c079af0ad791a92fe9dade375744f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab411221f912a6d9e4c82ac3963989403"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab411221f912a6d9e4c82ac3963989403">netconn_delete</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gab411221f912a6d9e4c82ac3963989403"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28430d1d86733f1bf98dc31305c42104"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api__lib_8c.html#a28430d1d86733f1bf98dc31305c42104">netconn_getaddr</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t *port, u8_t local)</td></tr>
<tr class="separator:a28430d1d86733f1bf98dc31305c42104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga63bcc4d7bd150674fa953a1253fa6230"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga63bcc4d7bd150674fa953a1253fa6230">netconn_bind</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:ga63bcc4d7bd150674fa953a1253fa6230"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa78479deeedcecd3bacade387ac40cc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gaa78479deeedcecd3bacade387ac40cc5">netconn_bind_if</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, u8_t if_idx)</td></tr>
<tr class="separator:gaa78479deeedcecd3bacade387ac40cc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacba7f74d973872ad0b88b9a96098cf77"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gacba7f74d973872ad0b88b9a96098cf77">netconn_connect</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:gacba7f74d973872ad0b88b9a96098cf77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90bb4c4d1af6602a655b78fce0520402"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#ga90bb4c4d1af6602a655b78fce0520402">netconn_disconnect</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:ga90bb4c4d1af6602a655b78fce0520402"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga84333ba8e7cdf45558d2b4795f53265d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga84333ba8e7cdf45558d2b4795f53265d">netconn_listen_with_backlog</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, u8_t backlog)</td></tr>
<tr class="separator:ga84333ba8e7cdf45558d2b4795f53265d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13593148f60f7bbc6a505b567f175d69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga13593148f60f7bbc6a505b567f175d69">netconn_accept</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetconn.html">netconn</a> **new_conn)</td></tr>
<tr class="separator:ga13593148f60f7bbc6a505b567f175d69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6893cb7648733d1f05696bac94e10490"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga6893cb7648733d1f05696bac94e10490">netconn_recv_tcp_pbuf</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structpbuf.html">pbuf</a> **new_buf)</td></tr>
<tr class="separator:ga6893cb7648733d1f05696bac94e10490"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb8a242c445ef928c23258a2b2344294"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#gabb8a242c445ef928c23258a2b2344294">netconn_recv_tcp_pbuf_flags</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structpbuf.html">pbuf</a> **new_buf, u8_t apiflags)</td></tr>
<tr class="separator:gabb8a242c445ef928c23258a2b2344294"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a805a90b546c5a149f04782351633979b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api__lib_8c.html#a805a90b546c5a149f04782351633979b">netconn_recv_udp_raw_netbuf</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> **new_buf)</td></tr>
<tr class="separator:a805a90b546c5a149f04782351633979b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a505c3b8e400babf9681e09c945b7f421"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api__lib_8c.html#a505c3b8e400babf9681e09c945b7f421">netconn_recv_udp_raw_netbuf_flags</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> **new_buf, u8_t apiflags)</td></tr>
<tr class="separator:a505c3b8e400babf9681e09c945b7f421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50490bab058f4e740798beffcf48cabf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#ga50490bab058f4e740798beffcf48cabf">netconn_recv</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> **new_buf)</td></tr>
<tr class="separator:ga50490bab058f4e740798beffcf48cabf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e1d852119bda1e1b602c2995282ef0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#ga8e1d852119bda1e1b602c2995282ef0c">netconn_sendto</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> *buf, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u16_t port)</td></tr>
<tr class="separator:ga8e1d852119bda1e1b602c2995282ef0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac4d4d10153d47c80a783c34b27c66238"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#gac4d4d10153d47c80a783c34b27c66238">netconn_send</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetbuf.html">netbuf</a> *buf)</td></tr>
<tr class="separator:gac4d4d10153d47c80a783c34b27c66238"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacf9ce6f71652739d6be2ca83f7c423bf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#gacf9ce6f71652739d6be2ca83f7c423bf">netconn_write_partly</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written)</td></tr>
<tr class="separator:gacf9ce6f71652739d6be2ca83f7c423bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a992b4fe8a855fd94861738f7260d0a32"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="api__lib_8c.html#a992b4fe8a855fd94861738f7260d0a32">netconn_write_vectors_partly</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, struct <a class="el" href="structnetvector.html">netvector</a> *vectors, u16_t vectorcnt, u8_t apiflags, size_t *bytes_written)</td></tr>
<tr class="separator:a992b4fe8a855fd94861738f7260d0a32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga25bb1c1c9928f91f53149a026e2e2624"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga25bb1c1c9928f91f53149a026e2e2624">netconn_close</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:ga25bb1c1c9928f91f53149a026e2e2624"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9eccae90351eb6c3d2ca690068445d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gab9eccae90351eb6c3d2ca690068445d4">netconn_err</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn)</td></tr>
<tr class="separator:gab9eccae90351eb6c3d2ca690068445d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ec6b2cf7b0f59e9371e38ae7dea2a63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__tcp.html#ga6ec6b2cf7b0f59e9371e38ae7dea2a63">netconn_shutdown</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, u8_t shut_rx, u8_t shut_tx)</td></tr>
<tr class="separator:ga6ec6b2cf7b0f59e9371e38ae7dea2a63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaaf2f92eeb38dca70b3e6ad98c3c45ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#gaaaf2f92eeb38dca70b3e6ad98c3c45ed">netconn_join_leave_group</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *multiaddr, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *netif_addr, enum <a class="el" href="api_8h.html#a5c6ded2c082de1536019b197a0a912db">netconn_igmp</a> join_or_leave)</td></tr>
<tr class="separator:gaaaf2f92eeb38dca70b3e6ad98c3c45ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5db2a1cf06a5fbb36f433e637da8729b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__udp.html#ga5db2a1cf06a5fbb36f433e637da8729b">netconn_join_leave_group_netif</a> (struct <a class="el" href="structnetconn.html">netconn</a> *conn, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *multiaddr, u8_t if_idx, enum <a class="el" href="api_8h.html#a5c6ded2c082de1536019b197a0a912db">netconn_igmp</a> join_or_leave)</td></tr>
<tr class="separator:ga5db2a1cf06a5fbb36f433e637da8729b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb3494b149dff96ed8d1acb770ab52f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__netconn__common.html#gafb3494b149dff96ed8d1acb770ab52f5">netconn_gethostbyname_addrtype</a> (const char *name, <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *addr, u8_t dns_addrtype)</td></tr>
<tr class="separator:gafb3494b149dff96ed8d1acb770ab52f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Sequential API External module </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a28430d1d86733f1bf98dc31305c42104"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28430d1d86733f1bf98dc31305c42104">&#9670;&nbsp;</a></span>netconn_getaddr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_getaddr </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>local</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the local or remote IP address and port of a netconn. For RAW netconns, this returns the protocol instead of a port!</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn to query </td></tr>
    <tr><td class="paramname">addr</td><td>a pointer to which to save the IP address </td></tr>
    <tr><td class="paramname">port</td><td>a pointer to which to save the port (or protocol for RAW) </td></tr>
    <tr><td class="paramname">local</td><td>1 to get the local IP address, 0 to get the remote one </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_CONN for invalid connections ERR_OK if the information was retrieved </dd></dl>

</div>
</div>
<a id="ad0a0434e5ff08bb350740cb840e2aca8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0a0434e5ff08bb350740cb840e2aca8">&#9670;&nbsp;</a></span>netconn_new_with_proto_and_callback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structnetconn.html">netconn</a>* netconn_new_with_proto_and_callback </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a>&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="api_8h.html#a3e130339f00202b3ab714af502163a2d">netconn_callback</a>&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a new netconn (of a specific type) that has a callback function. The corresponding pcb is also created.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>the type of 'connection' to create (</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>enum <a class="el" href="group__netconn__common.html#gaaba260d28d105fb4bce9185fd0300d91">netconn_type</a>) </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">proto</td><td>the IP protocol for RAW IP pcbs </td></tr>
    <tr><td class="paramname">callback</td><td>a function to call on status changes (RX available, TX'ed) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated struct netconn or NULL on memory error </dd></dl>

</div>
</div>
<a id="a805a90b546c5a149f04782351633979b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a805a90b546c5a149f04782351633979b">&#9670;&nbsp;</a></span>netconn_recv_udp_raw_netbuf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_recv_udp_raw_netbuf </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structnetbuf.html">netbuf</a> **&#160;</td>
          <td class="paramname"><em>new_buf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Receive data (in form of a netbuf) from a UDP or RAW netconn</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn from which to receive data </td></tr>
    <tr><td class="paramname">new_buf</td><td>pointer where a new netbuf is stored when received data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if data has been received, an error code otherwise (timeout, memory error or another error) ERR_ARG if conn is not a UDP/RAW netconn </dd></dl>

</div>
</div>
<a id="a505c3b8e400babf9681e09c945b7f421"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a505c3b8e400babf9681e09c945b7f421">&#9670;&nbsp;</a></span>netconn_recv_udp_raw_netbuf_flags()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_recv_udp_raw_netbuf_flags </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structnetbuf.html">netbuf</a> **&#160;</td>
          <td class="paramname"><em>new_buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>apiflags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Receive data (in form of a netbuf) from a UDP or RAW netconn</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the netconn from which to receive data </td></tr>
    <tr><td class="paramname">new_buf</td><td>pointer where a new netbuf is stored when received data </td></tr>
    <tr><td class="paramname">apiflags</td><td>flags that control function behaviour. For now only:<ul>
<li>NETCONN_DONTBLOCK: only read data that is available now, don't wait for more data </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if data has been received, an error code otherwise (timeout, memory error or another error) ERR_ARG if conn is not a UDP/RAW netconn </dd></dl>

</div>
</div>
<a id="a992b4fe8a855fd94861738f7260d0a32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a992b4fe8a855fd94861738f7260d0a32">&#9670;&nbsp;</a></span>netconn_write_vectors_partly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> netconn_write_vectors_partly </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structnetconn.html">netconn</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structnetvector.html">netvector</a> *&#160;</td>
          <td class="paramname"><em>vectors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16_t&#160;</td>
          <td class="paramname"><em>vectorcnt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>apiflags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>bytes_written</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Send vectorized data atomically over a TCP netconn.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>the TCP netconn over which to send data </td></tr>
    <tr><td class="paramname">vectors</td><td>array of vectors containing data to send </td></tr>
    <tr><td class="paramname">vectorcnt</td><td>number of vectors in the array </td></tr>
    <tr><td class="paramname">apiflags</td><td>combination of following flags :<ul>
<li>NETCONN_COPY: data will be copied into memory belonging to the stack</li>
<li>NETCONN_MORE: for TCP connection, PSH flag will be set on last segment sent</li>
<li>NETCONN_DONTBLOCK: only write the data if all data can be written at once </li>
</ul>
</td></tr>
    <tr><td class="paramname">bytes_written</td><td>pointer to a location that receives the number of written bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK if data was sent, any other err_t on error </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_da61e3e9a357748887e3ca8d7c5a0c16.html">api</a></li><li class="navelem"><a class="el" href="api__lib_8c.html">api_lib.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
